package j01neibulei;

class Dog{
    void say(){
        System.out.println("汪汪");
    }
}
interface IA{
    void f1();
}

public class J3shilifangfa {
    public static void main(String[] args) {
        Dog dog = new Dog();
        IA ia = dog::say;
        ia.f1();

        IA ia2 = new Dog()::say;
        ia2.f1();
    }
}
